// local to local tool

package com.smart.utils {

	import flash.display.Stage;

	public class FlashUtils {
	
		public static function getFileName(stage:Stage):String {
		
			var str:String = stage.loaderInfo.url; 			
			var id:int = str.lastIndexOf('/');
			var filename:String = str.substring(id+1, str.length);
			var dot:int = filename.lastIndexOf('.'); 			
			// get just the filename 
			return filename.substring(0,dot);
		}
	}
}